<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="refresh" content="3;url=/">
    <title>登录失败</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f0f0f0;
            margin: 0;
            padding: 0;
            display: flex;
            justify-content: center;
            align-items: center;
            height: 100vh;
        }

        #login-failed {
            text-align: center;
            background-color: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        #countdown {
            font-size: 36px;
            font-weight: bold;
            color: red;
        }

        button {
            padding: 10px 20px;
            background-color: #007bff;
            color: #fff;
            border: none;
            border-radius: 5px;
            cursor: pointer;
            margin-top: 20px;
        }
    </style>
    <script>
        function goBack() {
            history.back();
        }

        function startCountdown(duration, display) {
            var timer = duration;
            setInterval(function () {
                display.textContent = timer;

                if (--timer < 0) {
                    timer = duration;
                }
            }, 1000);
        }

        window.onload = function () {
            var countdown = document.getElementById("countdown");
            startCountdown(3, countdown);
        };
    </script>
</head>
<body>
<div id="login-failed">
    <h1>登录失败！请检查您的账号或密码！</h1>
    <p>倒计时：<span id="countdown">3</span>秒后自动返回上一页...</p>
    <button onclick="goBack()">返回登录页面</button>
</div>
</body>
</html>